package service.artist;

import dao.ArtistDAO;
import dao.RecordDuplicateException;
import entities.Artist;


public class ArtistServiceInMemory implements ArtistService {

	public ArtistServiceInMemory(){
		
	}
	
	public static ArtistService newInstance(){
		return new ArtistServiceInMemory();
	}
	
	/**
	 * Finds a customer based on the customer id.
	 * @param userid - user id
	 * @return the instance of the customer
	 */
	public Artist findArtist(Long a_id){
		ArtistDAO db = ArtistDAO.getInstance();
		Artist result = null;
		result = db.findArtist(a_id);
		return result;
	}
	
	
	/**
	 * Adds a new customer to the system.
	 * @param obj - the customer instance to add
	 */
	
	public void addArtist(Artist obj) throws RecordDuplicateException{
		ArtistDAO db = ArtistDAO.getInstance();	
		db.addArtist(obj);
		return;
	}

}
